﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Guest_Default" %>
<%@ Register assembly="AspNetPager" namespace="Wuqi.Webdiyer" tagprefix="webdiyer" %>
<%@ Register src="~/control/Page_Left.ascx" tagname="Page_Left" tagprefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <%=this.UI_Head() %>
    <link  href="../Css/Guest.css" rel="Stylesheet"  type="text/css" />
    <script src="../Script/UserAjaxLogin.js" type="text/javascript"></script>
    </head>
<body>
   
    <%=this.UI_TopControl()%>
    <div  class="topbanner bodyList">
        <div class="body_995"> 
           <div class="left">
           
                 <uc1:Page_Left ID="Page_Left1" runat="server" />
           
           </div>
           <div class="Index_Right2">
            <form id="form1" runat="server">
            <asp:Panel ID="palGuestList" runat="server">
                <asp:Repeater ID="rptGuestList" runat="server" 
                    onitemdatabound="rptGuestList_ItemDataBound">
                    <ItemTemplate>
                        <table cellpadding="0" cellspacing="0"  width="100%"  style="border:1px solid #fde6ae;" >
                            <tr>
                                <td colspan="2" align="left" valign="top" style="border:1px solid #fde6ae;">
                                    <table cellspacing="3" style="border:1px solid #fde6ae;" cellpadding="0" border="0" bgcolor="#fde6ae" width="100%">
                                        <tr>
                                            <td align="left" valign="top" width="60%" >
                                                <font color="red">&nbsp;&nbsp;主题</font>:&nbsp;<%#Eval("GuestTitle") %>
                                            </td>
                                            <td align="right" valign="top" width="40%">
                                                <img src="../images/posttime.gif" width="11" align="absmiddle" height="11"> 
						                          <font color="#000000">： 
						                          <%#Eval("GuestTime","{0:yyyy-MM-dd HH:mm}") %>
						                          </font> 
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                            <tr>
                                <td rowspan=3   align="center"valign="middle" style=" width:100px;border-color:#fde6ae;border-right:1px solid #fde6ae;">
						            <%#UserImg(Eval("GuestSex")) %>
						            <br><%#GuestUserName(Eval("GuestName"),Eval("GuestIP"))%>
                                </td>
                                <td align="left" valign="middle" style="height:50px; padding:5px;line-height:20px;">
								            <%#Eval("GuestContent") %>
								            <%#AdminRe(Eval("AdminReply").ToString(),Eval("AdminReplyTime","{0:yyyy-MM-dd HH:mm}").ToString()) %>
								            
                                </td>
                            </tr>
                            <tr>
                                <td  align="left" valign="middle" style="padding-left:5px;border-top:1px solid #fde6ae;">
                                    <img src="<%#Eval("GuestWebPage").ToString()==""?"../images/nourl.gif":"../images/url.gif" %>" alt="<%#Eval("GuestWebPage").ToString()==""?"用户没有留下主页地址":Eval("GuestWebPage").ToString() %>" width="45" border="0" height="16">
                                    <img src="<%#Eval("GuestQQ").ToString()==""?"../images/nooicq.gif":"../images/oicq.gif" %>" alt="<%#Eval("GuestQQ").ToString()==""?"用户没有留下QQ号码":Eval("GuestQQ").ToString() %>" width="45" border="0" height="16">
                                    <img src="<%#Eval("GuestEmail").ToString()==""?"../images/noemail.gif":"../images/email.gif" %>" alt="<%#Eval("GuestEmail").ToString()==""?"用户没有留下Email地址":Eval("GuestEmail").ToString() %>" width="45" border="0" height="16">
                                    <img src="../images/other.gif" alt="<%#Eval("GuestMsn").ToString()==""?"":"Msn:"+Eval("GuestMsn").ToString() %><%#Eval("GuestIP").ToString()==""?"":"\r\nIP:"+Eval("GuestIP").ToString() %>"  width="45" border="0" height="16">
                                    &nbsp;
                                </td>
                            </tr>
                        </table>
                        <br />
                    </ItemTemplate>
                </asp:Repeater>
                <table cellpadding="0" cellspacing="5"   style="border-color:#fde6ae;" border="0"  width="100%" >
                    <tr >
                        <td align="right"><webdiyer:AspNetPager ID="AspNetPager1" runat="server" OnPageChanged="AspNetPager1_PageChanged" CurrentPageButtonPosition="Beginning" CustomInfoHTML="共%PageCount%页，当前为第%CurrentPageIndex%页，每页%PageSize%条" LayoutType="Table" NumericButtonTextFormatString="[{0}]" PageIndexBoxType="DropDownList" PageSize="10" ShowCustomInfoSection="Left" ShowPageIndexBox="Always" SubmitButtonText="Go" TextAfterPageIndexBox="页" TextBeforePageIndexBox="转到" UrlPaging="True" AlwaysShow="True">
                                    </webdiyer:AspNetPager></td>
                    </tr>
                </table>
            </asp:Panel>
            <asp:Panel ID="palWriteGuest" runat="server">
                <table style="align:center" cellpadding="5" cellspacing="0"  width="100%"  style="border:1px solid #fde6ae;" >
                    <tr>
                                            <td  colspan="3"  bgcolor="#fde6ae"  height="20" >
                                                <font color="red">&nbsp;&nbsp;签写留言</font>
                                            </td>
                                        </tr>
                    
                    
                    
                    <tr>
                        <td align="right">姓名:</td>
                        <td><asp:TextBox ID="txtName" runat="server" Width="164px" /></td>
                        <td></td>
                    </tr>
                    <tr>
                        <td align="right">性别:</td>
                        <td>
                            <asp:RadioButtonList ID="rbtnSexList" runat="server"  RepeatDirection="Horizontal">
                                <asp:ListItem Selected="True" Text="男" Value="1">
                                    
                                </asp:ListItem>
                                <asp:ListItem Text="女" Value="0">
                                    
                                </asp:ListItem>
                            </asp:RadioButtonList></td>
                        <td></td>
                    </tr>
                    <tr>
                        <td align="right">E-Mail:</td>
                        <td><asp:TextBox ID="txtEmail" runat="server" Width="164px" /></td>
                        <td></td>
                    </tr>
                    <tr>
                        <td align="right">QQ:</td>
                        <td><asp:TextBox ID="txtQQ" runat="server" Width="164px" /></td>
                        <td></td>
                    </tr>
                    <tr>
                        <td align="right">Msn:</td>
                        <td><asp:TextBox ID="txtMsn" runat="server" Width="164px" /></td>
                        <td></td>
                    </tr>
                    <tr>
                        <td align="right">个人主页:</td>
                        <td><asp:TextBox ID="txtMyWeb" runat="server" Width="164px" /></td>
                        <td></td>
                    </tr>
                    <tr>
                        <td align="right">留言主题:</td>
                        <td><asp:TextBox ID="txtTitle" runat="server" Width="369px" MaxLength="150" />
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                                ControlToValidate="txtTitle" Display="Dynamic" ErrorMessage="<br>留言标题不能为空"></asp:RequiredFieldValidator>
                        </td>
                        <td></td>
                        <tr>
                        <td  valign="top"  align="right">留言内容:</td>
                        <td><asp:TextBox ID="txtGuestContent" runat="server" TextMode="MultiLine" 
                                Width="507px" Height="76px" MaxLength="300" />
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                                ControlToValidate="txtGuestContent" Display="Dynamic" ErrorMessage="<br>留言内容不能为空"></asp:RequiredFieldValidator>
                            </td>
                        <td></td>
                    </tr>
                    <tr>
                        <td align="right">是否隐藏:</td>
                        <td>
                            <asp:RadioButtonList ID="rbtnHiddenList" runat="server" RepeatDirection="Horizontal">
                                <asp:ListItem Selected="True" Text="正常" Value="0">
                                    
                                </asp:ListItem>
                                <asp:ListItem Text="隐藏" Value="1">
                                    
                                </asp:ListItem>
                            </asp:RadioButtonList>
                            &nbsp;&nbsp;&nbsp;&nbsp;<font color="#009900">*</font>选择隐藏后，此留言只有管理员和留言者才可以看到。</td>
                        <td></td>
                    </tr>
                    <tr>
                        <td align="center" colspan=3>
                            <asp:Button ID="btnPublish" Text="发表留言" runat="server" OnClick="btnPublish_Click" style="border:1px solid #7F9DB9;color:#BA1211;font-family:Verdana,Arial,宋体;font-size:9pt;height:20px;" />
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        </td>
                    </tr>
                </table>
            </asp:Panel> 
        </form>
           
           </div> 
        
        
        </div>
    </div>
    <%=this.UI_boot() %>
   
</body>
</html>

